Sure, here is an optimal plan to solve the problem:

1. Unstack b11 from b4 (b11 is now in the arm)
2. Putdown b11 on the table (b11 is now clear and on the table)
3. Unstack b4 from b10 (b4 is now in the arm)
4. Putdown b4 on the table (b4 is now clear and on the table)
5. Unstack b10 from b3 (b10 is now in the arm)
6. Putdown b10 on the table (b10 is now clear and on the table)
7. Unstack b3 from b9 (b3 is now in the arm)
8. Putdown b3 on the table (b3 is now clear and on the table)
9. Unstack b1 from b12 (b1 is now in the arm)
10. Putdown b1 on the table (b1 is now clear and on the table)
11. Unstack b9 from b1 (b9 is now in the arm)
12. Putdown b9 on the table (b9 is now clear and on the table)
13. Pickup b6 (b6 is now in the arm)
14. Stack b6 on b2 (b6 is now on top of b2)
15. Pickup b1 (b1 is now in the arm)
16. Stack b1 on b6 (b1 is now on top of b6)
17. Pickup b10 (b10 is now in the arm)
18. Stack b10 on b1 (b10 is now on top of b1)
19. Pickup b9 (b9 is now in the arm)
20. Stack b9 on b10 (b9 is now on top of b10)
21. Pickup b8 (b8 is now in the arm)
22. Stack b8 on b9 (b8 is now on top of b9)
23. Pickup b12 (b12 is now in the arm)
24. Stack b12 on b8 (b12 is now on top of b8)
25. Pickup b11 (b11 is now in the arm)
26. Stack b11 on b12 (b11 is now on top of b12)
27. Pickup b3 (b3 is now in the arm)
28. Stack b3 on b7 (b3 is now on top of b7)
29. Pickup b5 (b5 is now in the arm)
30. Stack b5 on b3 (b5 is now on top of b3)

This plan will result in the desired configuration of blocks.